#include "ibmsgv_api.h"

#include "IDL_testib2_ibpts1_request.dsc.h"
#include "IDL_testib2_ibpts1_response.dsc.h"
#include "IDL_testib2_ibpts1_request.dsc.LOG.c"
#include "IDL_testib2_ibpts1_response.dsc.LOG.c"

int FUNCNAME_DSCLOG_testib2_ibpts1_request_info( testib2_ibpts1_request *pst )
{
        int     index[10] = { 0 } ; index[0]++; index[0] = 0 ;
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.sender_date[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.sender_date );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.sender_time[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.sender_time );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.sender_trans_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.sender_trans_no );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.channel_code[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.channel_code );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.branch_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.branch_no );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.oper_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.oper_no );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.login_session[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.login_session );
                INFOLOGG( "testib2_ibpts1_request.testib2_request_header.trans_code[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_request_header.trans_code );
                INFOLOGG( "testib2_ibpts1_request.testib2_ibpts1.account_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_ibpts1.account_no );
                INFOLOGG( "testib2_ibpts1_request.testib2_ibpts1.password[%s]" NEWLINE_DSCLOG_testib2_ibpts1_request , pst->testib2_ibpts1.password );
        return 0;
}


int FUNCNAME_DSCLOG_testib2_ibpts1_response_info( testib2_ibpts1_response *pst )
{
        int     index[10] = { 0 } ; index[0]++; index[0] = 0 ;
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.sender_date[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.sender_date );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.sender_time[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.sender_time );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.sender_trans_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.sender_trans_no );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.receiver_date[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.receiver_date );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.receiver_time[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.receiver_time );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.receiver_trans_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.receiver_trans_no );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.response_code[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.response_code );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.response_desc[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.response_desc );
                INFOLOGG( "testib2_ibpts1_response.testib2_response_header.response_message[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_response_header.response_message );
                INFOLOGG( "testib2_ibpts1_response.testib2_ibpts1.account_no[%s]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_ibpts1.account_no );
                INFOLOGG( "testib2_ibpts1_response.testib2_ibpts1.balance[%.2lf]" NEWLINE_DSCLOG_testib2_ibpts1_response , pst->testib2_ibpts1.balance );
        return 0;
}


funcIbmsgvTransmain transmain ;


funcIbasSomain somain ;
int somain( struct HttpBuffer *req_body , struct HttpBuffer *rsp_body , struct IbasAddonFiles *addon_files )
{
	testib2_ibpts1_request	req_st ;
	testib2_ibpts1_response	rsp_st ;
	
	int			nret = 0 ;
	
	INFOLOGG( "ENTER TESTTPS1" );
	
	memset( & req_st , 0x00 , sizeof(testib2_ibpts1_request) );
	memset( & rsp_st , 0x00 , sizeof(testib2_ibpts1_response) );
	nret = IBMSGVReceiver_XML( req_body , & DSCDESERIALIZE_XML_testib2_ibpts1_request_V , & req_st
				, rsp_body , & DSCSERIALIZE_XML_DUP_testib2_ibpts1_response_V , & rsp_st
				, & transmain , addon_files ) ;
	if( nret )
	{
		ERRORLOGG( "IBMSGVReceiver_XML failed[%d]" , nret );
	}
	else
	{

		INFOLOGG( "IBMSGVReceiver_XML ok" );
		FUNCNAME_DSCLOG_testib2_ibpts1_request_info(&req_st);
                FUNCNAME_DSCLOG_testib2_ibpts1_response_info(&rsp_st);
	}
	
	INFOLOGG( "LEAVE TESTTPS1" );
	
	return nret;
}

